<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
	<p:dialog id="findTeacher" header="#{msgs.FindTeacher}" widgetVar="wfindTeacher" modal="true" style="padding: 0px; margin: 0px;"> 
		<h:form id="findTeacherForm" prependId="false">
			<h:panelGrid columns="2" cellpadding="2">

				<h:outputLabel 	value="#{msgs.Name} :" 	for="findByName" />
				<p:inputText	id="findByName" 		value="#{ teacherBean.findByName}" 		 		maxlength="50" 	size="20" />

				<h:outputLabel 	value="#{msgs.LastName} :" 	for="findByLastName" />
				<p:inputText	id="findByLastName" 		value="#{ teacherBean.findByLastName}" 			maxlength="50" 	size="20" />

				<h:outputLabel	value="#{msgs.CPF} :" 			for="findByCpf" />
				<p:inputText id="findByCpf" 				value="#{teacherBean.findByCpf}"				maxlength="22" size="22" styleClass="cpf"  />

				<h:outputLabel	value="#{msgs.Email} :" 			for="findByEmail" />
				<p:inputText id="findByEmail" 				value="#{teacherBean.findByEmail}"				maxlength="50" size="51" />

				<h:outputLabel	value="#{ msgs.CreatedAt} :" />
				<h:column>
				<p:calendar		id="begCreatedAt"	value="#{teacherBean.begCreatedAt}"		locale="pt"		timeZone="Brazil/East" selectOtherMonths="true" readOnlyInputText="true"  />
                      #{ msgs.To}
                      <p:calendar		id="endCreatedAt"	value="#{teacherBean.endCreatedAt}"		locale="pt"		timeZone="Brazil/East" selectOtherMonths="true"	readOnlyInputText="true" />
				</h:column>


				<h:outputLabel	value="#{ msgs.ChangedAt} :" />
				<h:column>
				<p:calendar		id="begChangedAt"	value="#{teacherBean.begChangedAt}"		locale="pt"		timeZone="Brazil/East" selectOtherMonths="true" readOnlyInputText="true"  />
                      #{ msgs.To}
                      <p:calendar		id="endChangedAt"	value="#{teacherBean.endChangedAt}"		locale="pt"		timeZone="Brazil/East" selectOtherMonths="true"	readOnlyInputText="true" />
				</h:column>

				<h:outputLabel	value="#{ msgs.ExpireOn} :" />
				<h:column>
				<p:calendar			id="begExpireOn"	value="#{teacherBean.begExpireOn}"		locale="pt"		timeZone="Brazil/East" selectOtherMonths="true" readOnlyInputText="true"  />
                      #{ msgs.To}
                      <p:calendar	id="endExpireOn"	value="#{teacherBean.endExpireOn}"		locale="pt"		timeZone="Brazil/East" selectOtherMonths="true"	readOnlyInputText="true" />
				</h:column> 


				<h:outputLabel value="#{ msgs.Status}  :" />
				<p:selectOneRadio value="#{ teacherBean.findByStatus}">
					<f:selectItem itemLabel="#{ msgs.Active}" 		itemValue="true" />
					<f:selectItem itemLabel="#{ msgs.Inactive}" 	itemValue="false" />
				</p:selectOneRadio>

			</h:panelGrid>
			<p:commandButton value="#{ msgs.Search}"	actionListener="#{teacherBean.search}"	icon=" ui-icon-search"  process="@form" update=":listTeacherForm:teachersTable,:growl" oncomplete="wfindTeacher.hide()" />
			<p:commandButton value="#{ msgs.Clear}"		type="button"	icon="ui-icon-clean">
				 <p:ajax update="findTeacherForm" resetValues="true" />  	
			</p:commandButton>
		</h:form>
	</p:dialog>

	<p:dialog id="dlgupload" header="#{msgs.Upload}" widgetVar="wdlgupload" modal="true" dynamic="true" style="min-width:500px;padding: 0px; margin: 0px;">
		<h:form  prependId="false" enctype="multipart/form-data">
				<p:fileUpload fileUploadListener="#{teacherBean.uploadPhoto}" 
				mode="advanced" 
				styleClass="mobupload"
	            allowTypes="/(\.|\/)(jpg|jpeg)$/"
				sizeLimit="1073741824" 
				cancelLabel="#{msgs.Cancel}"
				label="#{msgs.SelectThePhoto}"
				uploadLabel="#{msgs.Upload}"
				oncomplete="dlgUpload.hide()"
				auto="true"
				invalidFileMessage="#{msgs.InvalidPhotoFormat}"
				update=":messages,:tabUser:formTeacherData:photoTeacher" />
				<br/>
		</h:form>
	</p:dialog>

	<p:confirmDialog message="#{msgs.DoYouReallyWantToDeleteThisEntry}"	header="#{msgs.Warning}" severity="alert" widgetVar="wconfExcTeacher">
		<h:form prependId="false">
			<p:commandButton value="#{msgs.Yes}" oncomplete="wconfExcTeacher.hide();"	process="@form" actionListener="#{teacherBean.deleteTeacher}"
				update=":listTeacherForm:teachersTable, :growl, :content"  />
			<p:commandButton value="#{msgs.No}" onclick="wconfExcTeacher.hide();"	type="button" />
		</h:form>
	</p:confirmDialog>	 
</html>
		